package com.seed.core.action;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.seed.core.enumeration.ActionType;
import com.seed.core.pojo.seed.Stat;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
import java.util.Map;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class PageAction extends Action {

    private List<String> declares; // 功能所需要的数据列
    private List<String> searches; // 如果是功能是page或list，这里申明对应的搜索拦，形如：name_like,age_eq等
    private List<String> orders; // 排序
    private Map<String, Stat> stats;

    public List<String> getDeclares() {
        return declares;
    }

    public void setDeclares(List<String> declares) {
        this.declares = declares;
    }

    public List<String> getSearches() {
        return searches;
    }

    public void setSearches(List<String> searches) {
        this.searches = searches;
    }

    public List<String> getOrders() {
        return orders;
    }

    public void setOrders(List<String> orders) {
        this.orders = orders;
    }

    public Map<String, Stat> getStats() {
        return stats;
    }

    public void setStats(Map<String, Stat> stats) {
        this.stats = stats;
    }

    @Override
    public Action copy() {
        return null;
    }

    @Override
    public List<RequestMethod> getMethods() {
        return List.of(RequestMethod.GET);
    }
}
